import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */
public class Test {

    public static int addArray(int[] array){
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            sum += array[i];
        }
        return sum;
    }
    public static void main4(String[] args) {
        int[] arr = new int[]{1,2,3,4,5};
        System.out.println(addArray(arr));
    }
    //斐波那契递归
    public static int fibonacci(int N){
        return N < 2 ? N : fibonacci(N-1) + fibonacci(N-2);
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fibonacci(n));
    }
    //冒泡排序
    public static int bubbleSort(int[] array){
        boolean flg = true;
        int count = 0;
        for (int i = 0; i < array.length -1; i++) {
            for (int j = 0; j < array.length - 1 -i; j++) {
                count++;
                if (array[j]>array[j+1]){
                    //交换元素
                    int tmp = 0;
                    tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tmp;
                    flg = false;
                }
            }
            //判断数组是否有序
            if (flg == true){
                break;
            }
        }
        return count;
    }
    public static void main2(String[] args) {
        //最好的情况
        int[] arr = new int[]{1,2,3,4,5};
        /*//最坏的情况
        int[] arr = new int[]{5,4,3,2,1};*/
        int count = bubbleSort(arr);
        System.out.println(count);
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                count++;
            }
        }
        for (int i = 0; i < N; i++) {
            count++;
        }
        int M = 10;
        while ((M--)>0){
            count++;
        }
        System.out.println(count);
    }
}
